package com.surveillance.tests;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.surveillance.BO.BOLayer;
import com.surveillance.BO.SalleBO;
import com.surveillance.entities.Etudiant;
import com.surveillance.entities.Salle;

public class PopulatingEtudiants {
	private static boolean isMatinee(Date dateFin) {
		return dateFin.getHours() < 12
				|| (dateFin.getHours() == 12 && dateFin.getMinutes() == 0);
	}

	public static void main(String[] args) {
		// ApplicationContext appContext = new ClassPathXmlApplicationContext(
		// "beanLocations.xml");
		// @SuppressWarnings("unchecked")
		// BOLayer<Salle> salleBO = (BOLayer<Salle>)
		// appContext.getBean("SalleBO");
		// BOLayer<Etudiant> etudiantBO = (BOLayer<Etudiant>) appContext
		// .getBean("EtudiantBO");
		// Etudiant etudiant = new Etudiant();
		// etudiant.setAffecte(false);
		// etudiant.setCne("122349758856");
		// etudiant.setIsMedecine(true);
		// etudiant.setNiveau(1);
		// etudiant.setNom("TAIBI");
		// etudiant.setPrenom("Maryam");
		// etudiantBO.save(etudiant);
		Date aDate = new Date(2014, 12, 21, 12, 0);
		System.out.println("est ce une matinee ?? " + isMatinee(aDate));
	}
}
